Manage Tanker service
TankerManager
Manage Tanker service.
class yandex_b2b_go.tanker.TankerManager
Attribute
-
TankerOrderManager — manage Tanker orders.
order: TankerOrderManager
TankerOrderManager
Manage Tanker orders.
class yandex_b2b_go.tanker.TankerOrderManager
Method
- list — gets information about Tanker transactions.
List
Receives information about transactions in Tanker.
async def list(
user_id: Optional[str] = None,
limit: Optional[int] = None,
since_datetime: Optional[str] = None,
till_datetime: Optional[str] = None
) -> TankerOrdersResponse
user_id— employee ID. If this parameter is not specified, information about all users is returned.limit— maximum number of orders in the response. Can be from 1 to 1000. If this parameter is not specified, information about the first 100 records is returned.since_datetime— the start date of the report period. String format:YYYY-MM-DDThh:mm:ss.sssin UTC without a time zone.till_datetime— the end date of the report period. String format:YYYY-MM-DDThh:mm:ss.sssin UTC without a time zone.
If successful, returns the TankerOrdersResponse class.
If the parameters are incorrect, the method returns the ValidationError error.
If the response code is not 200, an error is returned: ApiError.
Request example
import asyncio
from yandex_b2b_go import Client
from yandex_b2b_go import TankerManager
from yandex_b2b_go import errors
TOKEN = '<your token>'
async def main():
client = Client(token=TOKEN)
tanker_manager = TankerManager(client=client)
try:
orders = await tanker_manager.order.list(
user_id='bd0f...015',
limit=50,
)
...
except errors.ValidationError as e:
return str(e.args)
except errors.ApiError as e:
return e
asyncio.run(main())
Was the article helpful?
Previous
Next